<template>
  <fieldset>
    <legend>child</legend>
    <h1>child</h1>
    <h1>{{ v }}</h1>
    <h1>{{ f }}"+"</h1>
    <button @click="fk">点击</button>
  </fieldset>
</template>
<script>
export default {
  props: ["v"],
  data() {
    return {
      gift: "吃桃子",
      f: "",
    };
  },
  methods: {
    fk() {
      this.$emit("suibian", this.gift);
    },
  },
  mounted() {
    this.$bus.$on("get2", (input) => {
      console.log(input);
      this.f = input;
    });
  },
};
</script>
